package com.tmall.qatest.domain;

import com.taobao.hsf.notify.client.message.Message;
import com.taobao.tc.refund.client.message.RefundInfoMessageConverter;
import com.taobao.tc.refund.domain.message.RefundInfoTO;

/**
 * Created with IntelliJ IDEA.
 * User: Shuffle
 * Date: 13-1-31
 * Time: 下午2:26
 * To change this template use File | Settings | File Templates.
 */
public class OnsaleRefundWood implements Wood {
    private RefundInfoTO refundInfo;
    private RefundInfoMessageConverter refundInfoConverter;

    public void setRefundInfo(RefundInfoTO refundInfo) {
        this.refundInfo = refundInfo;
    }

    public void setRefundInfoConverter(RefundInfoMessageConverter refundInfoConverter) {
        this.refundInfoConverter = refundInfoConverter;
    }

    @Override
    public Message prepareWood() {
        return refundInfoConverter.toMessage(refundInfo);
    }

    @Override
    public String getWoodType() {
        return refundInfoConverter.getMessageType();
    }
}
